﻿<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Blazing.BusinessObjects" namespace="Blazing.BusinessObjects.Locations" >
	<class name="Country" table="countries" lazy="false" dynamic-insert="true" dynamic-update="true">

		<id name="ID" column="countryid" type="Int32">
			<generator class="native" />
		</id>
		<timestamp column="rowstamp" name="RowStamp" />

		<property name="Name" length="100" not-null="true" />
		<property name="Countrycode" length="5" />
		<many-to-one name="Currency" column="currencyid" class="Currency" />

		<set name="States" inverse="true">
			<key column="countryid" />
			<one-to-many class="State" />
		</set>

	</class>
</hibernate-mapping>
